/**
 *  错误页面
 */
export const pageError = {
  path: "/404",
  name: "ErrorPage",
  component: () => import("~/views/errorPages/index.vue"),
};

/**
 * 登录注册
 */
export const loginRouter = [
  //   {
  //     path: "/login",
  //     name: "login",
  //     meta: {
  //       title: "登录",
  //       isLogin: true,
  //     },
  //     component: () => import("../view/login/index.vue"),
  //   },
  //   {
  //     path: "/Register",
  //     name: "Register",
  //     meta: {
  //       title: "注冊",
  //       isLogin: true,
  //     },
  //     component: () => import("../view/login/Register.vue"),
  //   },
];

/**
 * 主路由
 */
export const appRouter = [
  {
    path: "/",
    component: () => import("~/views/home/index.vue"),
  },

  {
    path: "/home",
    name: "Home",
    component: () => import("~/views/home/index.vue"),
  },

  {
    path: "/about",
    name: "about",
    component: () => import("~/views/about/index.vue"),
  },

  // {
  //   path: "/hero",
  //   name: "Hero",
  //   component: () => import("~/views/home/components/Hero.vue"),
  // },
  // {
  //   path: "/StoreTest",
  //   name: "StoreTest",
  //   component: () => import("~/views/home/components/StoreTest.vue"),
  // },
  {
    path: "/:pathMatch(.*)*",
    redirect: "/404",
  },
];

export const routesdata = [pageError, ...loginRouter, ...appRouter];
